package com.zhongan.gateway.service;

import java.util.List;

import com.zhongan.gateway.bean.Api;
import com.zhongan.gateway.bean.ApiAttribute;
import com.zhongan.gateway.bean.ApiGroup;
import com.zhongan.gateway.web.common.PageDTO;

public interface ApiService {

    //apigroup 操作
    int deleteGroupById(Long id);

    int insertApiGroup(ApiGroup record);

    int updateApiGroup(ApiGroup record);

    ApiGroup selectGroupById(Long id);

    List<ApiGroup> selectGroups();

    List<ApiGroup> selectGroupsByName(String name);

    //api 操作

    int deleteApi(Api record);

    Long insertApi(Api record);

    Api selectApiById(Long id);

    List<Api> selectApis(Api record);

    Api selectApi(String serviceName, String version);

    int updateApi(Api record);

    //apiAttribute 操作
    int deleteApiAttr(Long id, Long apiId);

    int insertApiAttr(ApiAttribute record);

    ApiAttribute selectApiAttrById(Long id);

    List<ApiAttribute> selectApiAttrs(Long apiId);

    int updateApiAttr(ApiAttribute record);

    PageDTO<Api> selectPageApis(String serviceName, Long groupId, Integer start, Integer limit);

}
